<h3><B>代金券查询</B></h3>
<br>
<form class="form-inline">
    <div class="form-group">
        <label>小区名称</label>
        <input type="text" class="form-control" ng-model="opt.community_name">
    </div>
    <div class="form-group">
        <label>用户id</label>
        <input type="text" class="form-control" ng-model="opt.user_id">
    </div>
    <div class="form-group">
        <label>代金券编号</label>
        <input type="text" class="form-control" ng-model="opt.card_no">
    </div>
    <div class="form-group">
        <label>消费状态</label>
        <select ng-model="opt.is_use" class="form-control" ng-options="m.value as m.name for m in useStatus">
            <option value="">-- 请选择 --</option>
        </select>
    </div>
    <div class="form-group">
        <label>获得原因</label>
        <select ng-model="opt.reward_source" class="form-control" ng-options="m.value as m.name for m in reward">
            <option value="">-- 请选择 --</option>
        </select>
    </div>
    <div class="form-group">
        <label>券生成日期</label>
        <input type="text" id="startDate" class="form-control datepicker" size="12" data-date-format="yyyy-mm-dd"
                >
        <label>到</label>
        <input type="text" id="endDate" class="form-control datepicker" size="12" data-date-format="yyyy-mm-dd"
                ></div>
    <button type="submit" class="btn btn-default" ng-click="getVoucherList(opt)">检索</button>
    <button type="submit" class="btn btn-default" ng-click="exportVoucherList(opt)">导出</button>
</form>
<br>
<br>

<div class="tab-content">
    <div class="tab-pane active" id="tab_a">

        <mutau>
            <ul class="pagination" num-pages="tasks.pageCount" current-page="tasks.currentPage"
                on-select-page="selectPage(page)">
                <li ng-class="{disabled: noPrevious()}"><a ng-click="selectPrevious()">&laquo;</a>

                </li>
                <li ng-repeat="page in pages" ng-class="{active: isActive(page)}"><a
                        ng-click="selectPage(page)">{{page}}</a>

                </li>
                <li ng-class="{disabled: noNext()}"><a ng-click="selectNext()">&raquo;</a>

                </li>
                <li ng-show="currentPage>6"><a ng-click="selectPage(1)">首页</a>

                </li>
            </ul>
        </mutau>

        <table class="table table-condensed">
            <thead>
            <tr>
                <th>小区名称</th>
                <th>用户id</th>
                <th>获得人昵称</th>
                <th>获得原因</th>
                <th>代金券编号</th>
                <th>生成日期</th>
                <th>失效日期</th>
                <th>交易日期</th>
                <th>消费状态</th>
                <th>礼品券金额</th>
                <th>币面结算金额</th>
                <th>商家奖励金额</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="voucher in voucherList">

                <td>{{voucher.community_name}}</td>
                <td>{{voucher.user_id}}</td>
                <td>{{voucher.nickName}}</td>
                <td>
                    <span ng-repeat="m in reward">
                        <span ng-show="m.value == voucher.reward_source">{{m.name}}</span>
                    </span>
                </td>
                <td>{{voucher.card_no}}</td>
                <td>{{voucher.create_time | date:'yyyy-MM-dd'}}</td>
                <td>{{voucher.expire_time | date:'yyyy-MM-dd'}}</td>
                <td>{{voucher.spending_time|date:'yyyy-MM-dd'}}</td>
                <td>
                   <span ng-repeat="m in useStatus">
                        <span ng-show="m.value == voucher.is_use">{{m.name}}</span>
                    </span>
                </td>
                <td>{{voucher.voucher_val}}</td>
                <td>{{voucher.deal_price}}</td>
                <td>{{voucher.retailer_price}}</td>
            </tr>
            </tbody>
        </table>
    </div>
</div>